import eslint_plugin_react from "eslint-plugin-react";
import eslint from "eslint/conf/rules";

/** @type {import('eslint').Linter.Config[]} */
// 使用 Flat Config 格式 (ESLint 9 默认)
export default [
    {
        // 加载需要的插件
        plugins: {
            react: eslint_plugin_react,
        },
        // 禁用所有规则
        rules: Object.keys(eslint).reduce((acc, rule) => {
            acc[rule] = "off";
            return acc;
        }, {}),
    },
];
